package com.itheima.bakery.demos.web.Repositories;

import com.itheima.bakery.demos.web.model.OrderDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderDetailRepository extends JpaRepository<OrderDetail, Integer> {
    List<OrderDetail> findByOrder_OrderID(Integer orderId);
    List<OrderDetail> findByProductId(Long productId);
}